Intro to Functional Dependencies

In this lesson, we will discuss the basic concepts of functional dependencies.

We'll cover the following

Introduction#

One important theory developed for the entity relational (ER) model involves the notion of functional dependency (FD). The aim of studying this is to improve your understanding of relationships among data and to gain enough formalism to assist with practical database design.

A functional dependency is a relationship between two attributes, typically the primary key (PK) and other non-key attributes within a table. For any relation R, attribute Y is functionally dependent on attribute X, if, for every valid instance of X, that value of X uniquely determines the value of Y. This relationship is indicated by the representation below :

svg viewer

The left side of the above FD diagram is called the determinant, and the right side is the dependent.

Example#

STUDENT relation

Student_Id Name Age
1 Spencer 22
2 Tony 20
3 Mark 23
4 Elyse 21

From the table above, it is obvious that Student_Id is the primary key as it is unique for each student.

So, following the above definition for functional dependencies, we conclude that:

  • Student_Id\rightarrowName,
  • Student_Id\rightarrowAge,

Since we can determine both the name and age of the student through his/her Student_Id.


In the next lesson, we will look at the rules of functional dependencies.

Quiz!
Rules of Functional Dependencies
Mark as Completed
Report an Issue